﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using Microsoft.Practices.Unity;
using Lekker.Services.Tags;
using Lekker.Services.Recipes;

namespace Lekker.Web.Mvc.Controllers {

    [HandleError]
    public class HomeController : Controller {

        [Dependency]
        public ITagService TagService { get; set; }
        [Dependency]
        public IRecipeService RecipeService { get; set; }

        public ActionResult Index() {
            ViewData["Title"] = "Home Page";
            ViewData["Message"] = "Welcome to ASP.NET MVC!";

            ViewData["Tags"] = this.TagService.GetAllTags();
            ViewData["GuestMenus"] = this.RecipeService.GetRecentGuestMenus();
            ViewData["Recipes"] = this.RecipeService.GetRecentRecipes();

            return View();
        }

        public ActionResult About() {
            ViewData["Title"] = "About Page";

            return View();
        }
    }
}
